package amd.core.extraction;

import amd.core.data.ListTermFrequency;
/**
 * @version 1.0
 * @created 30-Apr-2009 15:46:52
 */
public class TermsExtractor {

	/**
	 * 
	 * @param stringInput
	 */
	public static ListTermFrequency extract(String stringInput){

        ListTermFrequency terms = new ListTermFrequency();
        terms = Tokenizer.tokenizing(stringInput);
        System.out.println();
        System.out.println("Hasil Tokenizing");
        for(int i=0; i<terms.size(); i++)
        {
            System.out.println(terms.get(i).getContent()+" "+terms.get(i).getFrequency());
        }

        terms = TermFilter.filtering(terms);
        System.out.println();
        System.out.println("Hasil Filtering");
        for(int i=0; i<terms.size(); i++)
        {
            System.out.println(terms.get(i).getContent()+" "+terms.get(i).getFrequency());
        }
        terms = Stemmer.stemming(terms);
        System.out.println();
        System.out.println("Terms");
        for(int i=0; i<terms.size(); i++)
        {
            System.out.println(terms.get(i).getContent()+" "+terms.get(i).getFrequency());
        }

        return terms;
	}


}